<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
    <meta name="renderer" content="webkit">
    <!--国产浏览器高速模式-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />

    <!-- 定义页面的最新版本 -->
    <meta name="description" content="网站简介" />
    <!-- 网站简介 -->
    <meta name="keywords" content="搜索关键字，以半角英文逗号隔开" />

    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <title>订单回调</title>
    <script type="text/javascript" src="../js/jquery-1.9.1.min.js"></script>
    <script src="/config.js"></script>
    <style type="text/css">
        .weui-toast {
            z-index: 5000;
            width: 100%;
            height: 500px;
            top: 40%;
            left: 50%;
            -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
            text-align: center;
            border-radius: 5px;
            color: hsla(0, 5%, 13%, 0.9);
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: center;
            -webkit-align-items: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            background-color: #ffffff;
            font-size: 14px;
            position: fixed;
        }

        * {
            margin: 0;
            padding: 0;
        }

        .weui-icon_toast.weui-loading {
            margin: 8px 0;
            width: 138px;
            height: 138px;
            vertical-align: baseline;
        }

        .weui-loading {
            width: 20px;
            height: 20px;
            display: inline-block;
            vertical-align: middle;
            background-size: 100%;
            background-size: 100% 100%;;
        }

        .weui-toast1 {
            position:fixed;
            z-index: 5000;
            width: 100%;
            height: 500px;
            top: 90%;
            left: 50%;
            -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
            text-align: center;
            border-radius: 5px;
            color: hsla(0, 10%, 81%, 0.9);
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-orient: vertical;
            -webkit-box-direction: normal;
            -webkit-flex-direction: column;
            flex-direction: column;
            -webkit-box-align: center;
            -webkit-align-items: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            background-color: #884e4e00;
            font-size: 14px;
            font-weight: 700;
            position: fixed;
        }
    </style>
</head>
<body>

<div class="weui-toast">

</div>


<div class="weui-toast1"><p class="weui-toast__content">欢迎购买本商城商品</p>
    <p class="weui-toast__content">对订单如有疑问，请联系商城客服</p>
</div>

<script>
    function GetUrlParam() {
        let url = document.location.toString();
        let arrObj = url.split("?");
        if (arrObj.length > 1) {
            return arrObj[1];
        }
        return null;
    }

    var Param = GetUrlParam();
    function notifyForGet(Param) {
            $.ajax({
                type: "POST",
                url: JONO_HOST + '/pay/notifyForGet',
                data: {
                    Param
                },
                dataType: "json",
                xhrFields: {
                    withCredentials: true
                },
                crossDomain: true,
                async: false,
                success: function (data) {
                    if (data.result == 1) {
                        $(".weui-toast").html(`
                            <i class="weui-loading weui-icon_toast"></i>
                            <p class="weui-toast__content">您的订单支付成功，正在跳转中请稍候</p>
                        `);
                        $(".weui-loading").css('background-image',"url('/images/success.png')")
                    }else{
                        $(".weui-toast").html(`
                            <i class="weui-loading weui-icon_toast"></i>
                            <p class="weui-toast__content">检测商品未到账，请联系客服处理</p>
                            <p class="weui-toast__content">正在跳转中请稍候</p>
                        `);
                        $(".weui-loading").css('background-image',"url('/images/fail.png')")
                    }
                    setTimeout(function () {
                        window.location.href = "/";
                    }, 3000);
                }
            });
    }

    notifyForGet(Param);
</script>
</body>
</html>